<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="app" uri="http://www.wanrenhui.com"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<%@include file="/res/include/base-head.jsp"%>
<%@include file="/res/include/jquery-easyui.jsp"%>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/res/js/coupon/couponBase.js"></script>
</head>
<body>
	<input type="hidden" id="couponId" value="${couponId}"/>
	<div id="toolbar" style="padding: 2px;">
		<a href="javascript:void(0);" class="easyui-linkbutton"
			data-options="iconCls:'icon-add',plain:true"
			onclick="admin.couponBase.chooseUser();">添加用户</a>
	</div>
	<div class="easyui-layout" data-options="fit:true">
		<div data-options="region:'north',border:false,split:false">
	    	<form id="query-form" class="search_form clearfix">
	            <dl>
					<dt>用户帐号：</dt>
					<dd>
						<input name="userIdentity" id="userIdentity" type="text" class="txt" maxlength="64"/>
					</dd>
				</dl>
				<dl>
	                <dt>状态：</dt>
	                <dd>
	                	<select name="status" id="status" class="txt grid-8">
	                		<option value="">--请选择--</option>
	                		<option value="1">未使用</option>
	                		<option value="2">已使用</option>
	                		<option value="3">已过期</option>
	                	</select>
	                </dd>
	            </dl>
	            <p class="search_form_btn">
	            	<input type="button" value="搜索" class="icon_serach" onclick="admin.couponBase.queryUser()" />
	            </p>
	            <dl></dl>
	            <p class="search_form_btn">
	            	<input type="button" value="导出帐号" class="icon_serach" onclick="admin.couponBase.exportUserPhone2Excel()" />
	            </p>
	        </form>
	  	</div>
		<div data-options="region:'center',border:false">
			<table id="datagrid"
				data-options="url:'${pageContext.request.contextPath}/coupon/user/list?couponId=${couponId }',toolbar:'#toolbar'">
				<thead>
					<tr>
						<th data-options="field:'couponNo',width:150,align:'center'">券编号</th>
						<th data-options="field:'userIdentity',width:300,align:'center' ">用户帐号</th>
						<th data-options="field:'strStatus',width:80,align:'center'">状态</th>
						<th data-options="field:'strExpireAt',width:130,align:'center' ">失效时间</th>
						<th data-options="field:'strNewAt',width:130,align:'center' ">获得时间</th>
						<th data-options="field:'strUpdAt',width:130,align:'center' ">使用时间</th>
					</tr>
				</thead>
			</table>
		</div>
	</div>
</body>
</html>
